#include "windows.h"
#include "WinLock.h"

WinLock::WinLock()
{
	InitializeCriticalSectionAndSpinCount(&m_lock, 4000);
}

WinLock::~WinLock()
{
	DeleteCriticalSection(&m_lock);
}

void WinLock::lock()
{
	EnterCriticalSection(&m_lock);
}

void WinLock::lock(long millisec)
{
	lock();
}

void WinLock::unlock()
{
	LeaveCriticalSection(&m_lock);
}
